require.config({
	paths: {
		swiper: '../vendor/swiper/swiper-3.4.0.jquery.min',
		'swiper.animate': '../vendor/swiper/swiper.animate1.0.2.min',
		zepto: '../vendor/zepto.min',
		lazyload: '../vendor/lazyload/zepto.picLazyLoad',
		lazyloadmin: '../vendor/lazyload/zepto.picLazyLoad.min',
		hammer:'../vendor/hammer'
	}
});
require([ 'zepto','swiper', 'swiper.animate','lazyload','lazyloadmin','hammer','common'], function($) {
//lazyload

$('.test-lazyload').picLazyLoad({
			    threshold:-80,
			});
//图片轮播
	$(function() {
		var mySwiper = new Swiper('.swiper-container', {
			loop: true,
			pagination: '.swiper-pagination',
			autoplay: 3000,
			speed: 1000,
		})
	})
	//产品分类
	$(window).scroll(function() {
		var fixedAll = $('#watchSectionFixed');
		var fixed = $('.watch-section-all');
		var tops = fixed.offset().top;
		var top = $(window).scrollTop()
		if((tops - top) <= 0) {
			fixedAll.css({
				position: 'fixed',
				top: "0px",
				left: "0px",
				width: '100%',
				margin: '0px'
			})
		} else {
			fixedAll.css({
				margin: '10px 0px',
				position: 'static'
			})
		}
	})
})